
$(function () {
    $.ajaxPrefilter(function (option) {
        option.url = 'http://localhost:8080/api/v1' + option.url
        option.headers = {
            Authorization: localStorage.getItem('token')
        }
        let index;
        option.beforeSend = function () {
            index = layer.load(2)
        }
        option.complete = function () {
            layer.close(index)
        }
    })
})